Referring to FIGS. 5 to 7, a description will be given of a conventional sewing machine. In FIGS. 5 and 6, a sewing machine is comprised of a driving section 1 having a motor 7 for effecting such as the vertical movement of a needle 5, an operating section 30 for imparting a control command to the driving section 1, and a control section 40 for driving and controlling the driving section 1 on the basis of the command from the operating section 30.
The driving section 1 is connected to a solenoid 3 for driving a sewing machine head, through a motor-side pulley 19 connected to a shaft of a motor 7 meshing with a timing belt 17, and through a sewing-machine-side pulley 15 connected to a shaft 11 of the sewing machine meshing with the timing belt 17. It should be noted that an encoder 9 serving as a rotational-angle detecting means for detecting the rotational angle of the motor 7 is connected to the shaft of the motor 7, and a needle position detector 13 for detecting an upper position, shown in FIG. 7, of the needle 5 is connected to an end of the shaft 11 of the sewing machine.
The operating section 30 has a plurality of switches 32 for imparting commands to the driving section 1, the solenoid 3, the encoder 9, and the like, as well as a display unit 36 constituted by a liquid-crystal display for displaying the contents of operation of the switches 32.
The control section 40 has a control-command generating unit 50 for generating commands for controlling the motor 7, the encoder 9, and the like, as well as a driving unit 60 for obtaining a signal for driving the encoder 7 on the basis of a signal from the control-command generating unit 50.
The control-command generating unit 50 has an interface portion (hereafter referred to as the I/O) serving as a connecting portion for transmitting and receiving electrical signals with respect to the operating section 30; an I/O 52 serving as a connecting portion for transmitting and receiving electrical signals to and from the encoder 9; a CPU 53 for supervising and controlling; a nonvolatile memory portion (hereafter referred to as the control memory) 55 for storing various data and capable of electrically writing and erasing the data; and an I/O 57 serving as a connecting portion for transmitting an electrical signal to the driving section 60.
The driving unit 60 has an I/O 62 for receiving an electrical signal from the I/O 57 of the control-command generating unit 50, as well as an I/O 64 for transmitting an electrical signal to the motor 7. Connectors 70 and 72 are provided for detachably connecting output lines of the control section to a lead wire of the motor 7 and a lead wire of the encoder 9.
Since the conventional sewing machine is configured as described above, there have been drawbacks in that since an unillustrated upper-position detecting disk inside the needle position detector 13 is attached to the shaft 11 of the sewing machine and rotates at high speed, the upper-position detecting disk is liable to break down, and since the sewing machine must be driven after positioning the disk, the operation is intricate.
To overcome such drawbacks, it is conceivable to provide an arrangement in which, as shown in FIG. 6, an angle setting switch 34 is added for setting the angle of the motor 7 corresponding to the upper position of the needle 5 (this angle will be hereafter referred to as the upper-position angle), and to effect the operation as will be described below.
First, after the power supply of the control section 40 is turned on, the operator moves the needle 5 to the point of upper position thereof, i.e., to the value A (a motor rotation angle Ua) of a sawtooth output waveform of the encoder 9, as shown in FIG. 7. If the operator then turns on the angle setting switch 34, the display unit displays "UPSET," and the state is set in the set standby state. If the operator turns on the angle setting switch 34 again, the control CPU 53 stores the value Ua of the upper-position angle (the output waveform value A of the encoder 9) in the control memory 55. At this upper-position angle, the sewing machine is readily operable.
However, if the motor 7 breaks down due to some cause or other and is replaced with another motor 7, since a reference point of the rotating position is provided on the sewing machine-side pulley 19 to simplify the adjustment, and the sewing machine-side pulley 19 is connected to the motor shaft 11 through the timing belt 17, the reference point for the motor-side pulley 15 deviates, and the sawtooth output waveform of the encoder 7 becomes those shown at the solid lines and the chain lines as shown in FIG. 7, so that the upper-position angle changes from Ua to Ui, thereby producing a large error in the detection of the upper position of the needle 5. Accordingly, there has been a problem in that if the sewing machine is driven on the basis of this error, the sewn object is conceivably difficult to remove from the needle 5.
In addition, there has been another problem in that in a case where the control section 40 has broken down, if the control section is replaced, since only the control section 40 stores the upper-position angle of the needle 5, the upper-position angle must be set again, which is troublesome.